package org.NooLab.itexx.app.controller;

import java.io.Serializable;
import java.util.ArrayList;




public class ScoredSerDocument implements ScoredSerDocumentIntf, Serializable{


	ScoredSerDocuments parent;
	
	ArrayList<String> wordList = new ArrayList<String>();

	private String targetDocUrl;

	private String docUrl;

	private String docContentText;

	private String rqQuery;

	private String summaryText; 
	
	// -----------------------------------
	boolean scheduledForRemoval = false;
	boolean checkedForDisplay   = false;

	private double score;

	private String requestGuid;

	private String packageGuid;

	private String requestUrl;
	
	// ------------------------------------------------------------------------
	public ScoredSerDocument(ScoredSerDocuments parent){
		
		this.parent = parent;
		
	}
	// ------------------------------------------------------------------------

	public void setRequestUrl(String urlStr) {
		// 
		requestUrl = urlStr;
	}


	public void setDocumentUrl(String urlstr) {

		docUrl = urlstr;
	}

	/**
	 * this determines the position in the list
	 * 
	 * @param score
	 */
	public void setScore(double value) {
		// 
		this.score = value;
	}

	public void setHotSpots(ArrayList<String> hotSpotSnippets) {
		// 
		
	}

	public void setRequestGuid(String rguid) {
		// 
		requestGuid = rguid;
	}

	public void setPackageGuid(String pguid) {
		// 
		packageGuid = pguid;
	}

	public void setSummary(String textsnip) {
		// 
		summaryText = textsnip ;
	}

	public void setRequestQuery(String rquery) {
		//
		rqQuery = rquery;
	}

	public void setDocContentText(String contentText) {
		// 
		docContentText = contentText;
	}

	public void setTargetDocUrl(String docurl) {
		// 
		this.docUrl = docurl;
	}

	public void setWordList( ArrayList<String> wordlist) {
		wordList.clear();
		addWordList(wordlist) ;
	}
	public void addWordList( ArrayList<String> wordlist) {
		// 
		if ((wordlist==null) || (wordlist.size()==0)){
			return;
		}
		
		for (int i=0;i>wordlist.size();i++){
			String w = wordlist.get(i).trim() ;
			wordList.add(w) ;		}
	}

	public ScoredSerDocuments getParent() {
		return parent;
	}

	public void setParent(ScoredSerDocuments parent) {
		this.parent = parent;
	}

	public String getDocUrl() {
		return docUrl;
	}

	public void setDocUrl(String docUrl) {
		this.docUrl = docUrl;
	}

	public String getRqQuery() {
		return rqQuery;
	}

	public void setRqQuery(String rqQuery) {
		this.rqQuery = rqQuery;
	}

	public String getSummaryText() {
		return summaryText;
	}

	public void setSummaryText(String summaryText) {
		this.summaryText = summaryText;
	}

	public ArrayList<String> getWordList() {
		return wordList;
	}

	public String getTargetDocUrl() {
		return targetDocUrl;
	}

	public String getDocContentText() {
		return docContentText;
	}

	public boolean isScheduledForRemoval() {
		return scheduledForRemoval;
	}

	public void setScheduledForRemoval(boolean scheduledForRemoval) {
		this.scheduledForRemoval = scheduledForRemoval;
	}

	public boolean isCheckedForDisplay() {
		return checkedForDisplay;
	}

	public void setCheckedForDisplay(boolean checkedForDisplay) {
		this.checkedForDisplay = checkedForDisplay;
	}

	public double getScore() {
		return score;
	}

	public String getRequestGuid() {
		return requestGuid;
	}

	public String getPackageGuid() {
		return packageGuid;
	}

	public String getRequestUrl() {
		return requestUrl;
	}
	
	
	
}
